nlp: A Compiler for Nested Logic Programming
نویسندگان
چکیده
nlp is a compiler for nested logic programming under answer set semantics. It is designed as a front-end translating nested logic programs into disjunctive ones, whose answer sets are then computable by disjunctive logic programming systems, like dlv or gnt. nlp offers different translations: One is polynomial but necessitates the introduction of new atoms, another is exponential in the worst case but avoids extending the language. We report experimental results, comparing the translations on several classes of benchmark problems. 1 Nested Logic Programs and their Compilation Nested logic programs allow for arbitrarily nested formulas in heads and bodies of logic program rules under answer set semantics [4]. Nested expressions can be formed using conjunction, disjunction, and the negation-as-failure operator in an unrestricted fashion. Previous results [4] show that nested logic programs can be transformed into standard (unnested) disjunctive logic programs in an elementary way, applying the negation-as-failure operator to body literals only. This is of great practical relevance since it allows us to evaluate nested logic programs by means of off-the-shelf disjunctive logic programming systems, like dlv [3] and gnt [2]. However, it turns out that this straightforward transformation results in an exponential blow-up in the worst-case, despite the fact that complexity results indicate a polynomial translation among both formalisms. In [5], we provide such a polynomial translations of nested logic programs into disjunctive ones. This translation introduces new atoms reflecting the structure of the original program; in the sequel, we refer to it as the structural translation. Likewise, we refer to the possibly exponential one as being language-preserving.
منابع مشابه
The Metagrammar Compiler: An NLP Application with a Multi-paradigm Architecture
The concept of metagrammar has been introduced to factorize information contained in a grammar. A metagrammar compiler can then be used to compute an actual grammar from a metagrammar. In this paper, we present a new metagrammar compiler based on 2 important concepts from logic programming, namely (1) the Warren’s Abstract Machine and (2) constraints on finite set.
متن کاملA Polynomial Translation of Logic Programs with Nested Expressions into Disjunctive Logic Programs: Preliminary Report
Nested logic programs have recently been introduced in order to allow for arbitrarily nested formulas in the heads and the bodies of logic program rules under the answer sets semantics. Nested expressions can be formed using conjunction, disjunction, as well as the negation as failure operator in an unrestricted fashion. This provides a very flexible and compact framework for knowledge represen...
متن کاملnfn2dlp: A Normal Form Nested Programs Compiler
Normal Form Nested (NFN) programs have recently been introduced in order to allow for enriching the syntax of disjunctive logic programs under the answer sets semantics. In particular, heads of rules can be disjunctions of conjunctions, while bodies can be conjunctions of disjunctions. Different to many other proposals of this kind, NFN programs may contain variables, and a notion of safety has...
متن کاملAbteilung Wissensbasierte Systeme Polynomial Translations of Nested Logic Programs into Disjunctive Logic Programs
Nested logic programs have recently been introduced in order to allow for arbitrarily nested formulas in the heads and the bodies of logic program rules under the answer sets semantics. Nested expressions can be formed using conjunction, disjunction, as well as the negation as failure operator in an unrestricted fashion. This provides a very flexible framework for knowledge representation and r...
متن کاملNested Transactions in a Logical Language for Active Rules
We present a hierarchically structured transaction oriented concept for a rule based active database system In LL LHL we have proposed Statelog as a uni ed framework for active and deductive rules Following the need for better structuring capabilities we intro duce procedures as a means to group semantically related rules and to encapsulate their behavior In addition to executing elementary upd...
متن کامل